package cn.signalpha.modules.shop.entity;

import cn.signalpha.common.enums.StatusEnum;
import cn.signalpha.core.swagger.ApiModelPropertyEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类
 *
 * @author signalpha
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("shop_seller")
@ApiModel(value = "Seller对象", description = "商户")
public class Seller implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商户id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
  	private Long id;

	@ApiModelProperty(value = "用户id")
	private Long userId;

	@ApiModelProperty(value = "所属商户id")
	private Long sellerId;

	@ApiModelProperty(value = "分类id")
	private Long categoryId;

	@ApiModelProperty(value = "状态")
	@ApiModelPropertyEnum(StatusEnum.class)
	private Integer status;

	@ApiModelProperty(value = "名称")
	private String name;

	@ApiModelProperty(value = "关键字")
	private String keyword;

	@ApiModelProperty(value = "简介")
	private String brief;

	@ApiModelProperty(value = "logo")
	private String logo;

	@ApiModelProperty(value = "背景图")
	private String backImg;

	@ApiModelProperty(value = "街景图")
	private String streetImg;

	@ApiModelProperty(value = "资质图")
	private String licenseImg;

	@ApiModelProperty(value = "电话")
	private String mobile;

	@ApiModelProperty(value = "负责人")
	private String legalPerson;

	@ApiModelProperty(value = "省")
	private String province;

	@ApiModelProperty(value = "市")
	private String city;

	@ApiModelProperty(value = "区")
	private String district;

	@ApiModelProperty(value = "地址")
	private String address;

	@ApiModelProperty(value = "经度")
	private String lng;

	@ApiModelProperty(value = "纬度")
	private String lat;

	@ApiModelProperty(value = "账号")
	private String account;

	@ApiModelProperty(value = "账号类型：1主账号 2子账号")
	private Integer accountType;

	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	@ApiModelProperty(value = "密码")
	private String password;

	@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
	@ApiModelProperty(value = "扩展参数")
	private String ext;

	@ApiModelProperty(value = "是否自营")
	private Integer isSelf;

	@ApiModelProperty(value = "是否推荐")
	private Integer isPush;

	@ApiModelProperty(value = "是否显示")
	private Integer isShow;

	@ApiModelProperty(value = "是否审核商品")
	private Integer isAuditGoods;

	@ApiModelProperty(value = "是否开启自提")
	private Integer isOpenPick;

	@ApiModelProperty(value = "自提配置")
	private String pickConfig;

	@ApiModelProperty(value = "是否开启同城配送")
	private Integer isOpenDelivery;

	@ApiModelProperty(value = "同城配送配置")
	private String deliveryConfig;

	@ApiModelProperty(value = "排序值")
	private Integer sort;

	@ApiModelProperty(value = "商户评分")
	private Integer score;

	@ApiModelProperty(value = "商户号")
	private String serverNo;

	@ApiModelProperty(value = "自定义手续费比例")
	private Double serverRatio;

	@ApiModelProperty(value = "自定义手续费开关：0关 1开")
	private Integer serverRatioSw;

	@ApiModelProperty(value = "余额")
	private Double money;

	@ApiModelProperty(value = "更新信息")
	private String updateInfo;

	@ApiModelProperty(value = "更新备注")
	private String updateRemark;

	@ApiModelProperty(value = "角色id")
	private String roleId;

	@ApiModelProperty(value = "创建时间")
	private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

	@Version
	@ApiModelProperty(value = "乐观锁")
	private Integer version;
}
